package com.qkl.xiatang.app.dto.message;

import com.qkl.xiatang.app.utils.appenum.MessageTypeEnum;
import lombok.Data;

import java.util.Date;

@Data
public class AddMessageDTO {

    private MessageTypeEnum typeEnum;

    private String companyId;

    private Integer serialNo;

    private String serialName;

    private boolean finishTask;

    private boolean unfinishTask;

    private String unfeededMessage;

    private Date firstDate;

    private Date lastDate;

    private String userName;

    public static AddMessageDTO newDTO(MessageTypeEnum typeEnum){
        AddMessageDTO dto = new AddMessageDTO();
        dto.setTypeEnum(typeEnum);
        return dto;
    }

    public static AddMessageDTO newDTO(MessageTypeEnum typeEnum,Integer serialNo,String serialName){
        return newDTO(typeEnum,serialNo,serialName,false);
    }

    public static AddMessageDTO newDTO(MessageTypeEnum typeEnum,Integer serialNo,String serialName,boolean finishTask){
        AddMessageDTO dto = newDTO(typeEnum);
        dto.setSerialName(serialName);
        dto.setSerialNo(serialNo);
        dto.setFinishTask(finishTask);
        return dto;
    }

}
